<% remote_form_for @fetion,
    :url => login_lite_fetion_url(@fetion),
    :method => :put,    
    :loading => small_loading("lite_fetion_#{@fetion.id}_login", :height => '40px'),
    :failure => "alert(lite_fetion_state_name(request.responseText));$('fetion_#{@fetion.id}_login').onclick()", 
    :success => "$('lite_fetion_#{@fetion.id}').update(request.responseText)",
    :html => {
      :id => "fetion_#{@fetion.id}_login_form"
    } do |f|
 %> 
  <dl>
    <dt>验证码：</dt>
    <dd><%= text_field_tag 'verify_code','', :id =>"fetion_#{@fetion.id}_verify_code" %></dd>
    <dd>
      <%= hidden_field_tag 'session_id',@lite_fetion['session_id'] %>
      <img src="data:image/gif;base64,<%= @lite_fetion['data'] %>">
    </dd>
    <dd class="right">
      <%= link_to_function '登录', "$('fetion_#{@fetion.id}_login_form').onsubmit()", :class => :submit %>
      <%= link_to_remote '看不清，换一张', 
            :update => "lite_fetion_#{@fetion.id}_login",
            :url => login_lite_fetion_url(@fetion) , 
            :method => :get,
            :html => {
              :class => :reset
            } %> 
    </dd>
  </dl>
<% end %>